package com.aya.ite.component;

import java.util.Hashtable;
import java.util.Iterator;

public class Coffee extends AbstractMenu implements MenuComponent {
    @Override
    public String getName() {
        return "咖啡屋";
    }
    private Hashtable<String, Menu> menuItems = new Hashtable<>();

    public boolean addMenu(Menu menuItem) {
        return menuItems.put(menuItem.getName(), menuItem) == null;
    }

    public Iterator<Menu> createIterator() {
        return menuItems.values().iterator();
    }
}
